<template>
  <div>
    <van-grid :column-num='channelArr.length'>
      <van-grid-item 
      v-for="item in channelArr" 
      :key="item.id" 
      :icon="item.icon_url" 
      :text="item.name"
      @click="dianjiFn(item.id)"
       />
    </van-grid>
  </div>
</template>

<script>
export default {
  name: "Grid",
  props:["channelArr"],
  data() {
    return {};
  },
  methods: {
    dianjiFn(item){
      // 点击跳转
      this.$router.push({path:"/Channel",query:{id:item}});  
    }
  },
  created(){
    console.log(this.channelArr);
  }
};
</script>

<style>
</style>